﻿<UserControl 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Titler"
             xmlns:data="clr-namespace:Titler.ControlModels"
             xmlns:Properties="clr-namespace:Titler.Properties"
             x:Name="CtrlChemical"
             x:Class="Titler.Controls.ChemicalCtrl"
             mc:Ignorable="d"
             MinWidth="200">


    <UserControl.Resources>
        <Style x:Key="{x:Type Label}" TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="2"/>
            <Setter Property="Margin" Value="0,0,0,2"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="FontSize" Value="12pt"/>
        </Style>
        <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
            <Setter Property="Padding" Value="2"/>
            <Setter Property="Margin" Value="0,0,0,2"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFF3F3F3" Offset="0.45"/>
                        <GradientStop Color="#FFE0E0E0" Offset="0.55"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderBrush" Value="#FF707070"/>
            <Setter Property="Height" Value="30"/>
            <Setter Property="FontFamily" Value="Segoe UI"/>
            <Setter Property="FontSize" Value="12pt"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
        </Style>
        
        <data:PMControlModel x:Key="pMControlModelView" />
        
    </UserControl.Resources>


    <Grid 
        DataContext="{StaticResource pMControlModelView}">
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel>
            <Label x:Name="Txt_CVSize" Content="CV Size (in)" Margin="0,0,0,2" d:LayoutOverrides="Height"/>
            <Label x:Name="Txt_Pressure" Content="Pressure (psi)" Margin="0,0,0,2"/>
            <Label x:Name="Txt_BurstDisk" Content="B Disk (psi)" Margin="0,0,0,2"/>
            <Label x:Name="Txt_Config" Content="CV Config" Margin="0"/>
        </StackPanel>
        <StackPanel Grid.Column="1">
            <ComboBox x:Name="CVSize" Text="{Binding CVSize}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_CVSize}"
                      Margin="0,0,0,2" d:LayoutOverrides="Height"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross"
                      ToolTip="Check Valve Size" />
            <ComboBox x:Name="CVPressure" Text="{Binding CVPressure}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_CVPressure}"
                      Margin="0,0,0,2"
                      IsSynchronizedWithCurrentItem="True"
                      ToolTip="Check Valve Pressure"
                      Cursor="Cross" />
            <ComboBox x:Name="CVBurstDisk" Text="{Binding CVBurstDisk}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_CVBurstDisk}"
                      Margin="0,0,0,2"
                      IsSynchronizedWithCurrentItem="True"
                      ToolTip="Burst Disk Pressure"
                      Cursor="Cross" />
            <ComboBox x:Name="CVConfig"
                      Text="{Binding CVConfig}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_CVConfig}"
                      Margin="0"
                      IsSynchronizedWithCurrentItem="True"
                      ToolTip="Check Valve Configuration"
                      Cursor="Cross" />
        </StackPanel>

    </Grid>
</UserControl>
